package com.gome.base;

import com.gome.vue4j.core.AbstractVue4jComponent;
import com.gome.vue4j.core.FXMLPath;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.fxml.FXML;

/**
 * 事件绑定
 */
@FXMLPath("/base/l7-view.fxml")
public class L7ActionComponent extends AbstractVue4jComponent {

    @FXML
    public StringProperty counter = new SimpleStringProperty("0");

    @FXML
    void add(){
        int  i = Integer.parseInt(counter.get());
        counter.set("" + ++i);
    }

    public void sub(){
        int  i = Integer.parseInt(counter.get());
        counter.set("" + --i);
    }
}
